<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>订单管理</title>

		<link href="../AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">
		<link rel="stylesheet" type="text/css" href="../js/bootstrap/css/bootstrap.css" />
		<link href="../css/personal.css" rel="stylesheet" type="text/css">
		<link href="../css/orstyle.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="../js/vue2.5.js" ></script>
		<script type="text/javascript" src="../js/axios.min.js" ></script>
		<script type="text/javascript" src="../js/jquery-1.11.2.min.js" ></script>
		<script type="text/javascript" src="../js/global.js" ></script>
		<script type="text/javascript" src="../js/bootstrap/js/bootstrap.js" ></script>
		<script type="text/javascript" src="../js/layer/layer.js" ></script>
		<script src="../js/param.js"></script>
		<script src="../AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
		<script src="../AmazeUI-2.4.2/assets/js/amazeui.js"></script>
		<style>
			.th-item,.td-item{
			    width: 30%;
			}
			.th-id,.td-id{
				width: 10%;
			}.th-heji{
				width:20%;
			}
			.ss{
				margin-top:45%;
				
			}
			.del :hover{
				color:#ccc;
			}.s12 a{
			color:#000;
			}
			.s12 a:hover{
			color:#095f8a;
			cursor: pointer;
			
			}.s21{
				margin-top:35%;
				padding:5px;
			}.s22{
				margin-top:45%;
				margin-left:5px;
			}
			.s22 a{
			color:#000;
			}
			.s22 a:hover{
			color:#095f8a;
			}.s23{
				margin-top:35%;
				margin-left:15px;
			}
			.s32 a:hover{
			color:#095f8a;
			}
			.r{
				width:220px;
			}
			.r1{
				width:100px;
			}
			.or:hover{
				color:#095f8a;
			}
		
		</style>
	</head>

	<body>
		
            <div class="nav-table">
					   <div class="long-title"><span class="all-goods">全部分类</span></div>
					   <div class="nav-cont">
							<ul>
							<li class="index"><a href="../index.html">首页</a></li>
							<li class="qc"><a href="text.html">推荐</a></li>
							<li class="qc"><a href="../home/search.html">搜索</a></li>
							<li class="qc"><a href="#">团购</a></li>
							<li class="qc last"><a href="about.html">我们</a></li>
						</ul>
						</div>
			</div>
			<b class="line"></b>
		<div class="center container">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-order">

						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">订单管理</strong> / <small>myOrder</small></div>
						</div>
						<hr/>

						<div class="am-tabs am-tabs-d2 am-margin" data-am-tabs>

							<ul class="am-avg-sm-5 am-tabs-nav am-nav am-nav-tabs">
								<li class="am-active"><a href="#tab1" onclick="window.location.reload()">所有订单</a></li>
								<li><a href="#tab2">待付款</a></li>
								<li><a href="#tab3">待发货</a></li>
								<li><a href="#tab4">待收货</a></li>
								<li><a href="#tab5">待评价</a></li>
							</ul>

							<div class="am-tabs-bd">
								<div class="am-tab-panel am-fade am-in am-active" id="tab1">
									<div class="order-top">
										<div class="th th-id">
											<td class="td-inner">订单编号</td>
										</div>
										<div class="th th-item">
											<td class="td-inner">商品</td>
										</div>
										<div class="th th-price">
											<td class="td-inner">单价</td>
										</div>
										<div class="th th-number">
											<td class="td-inner">数量</td>
										</div>
										<div class="th th-operation">
											<td class="td-inner">交易状态</td>
										</div>
										<div class="th th-change">
											<td class="td-inner">交易操作</td>
										</div>
										<div class="th th-heji">
											<td class="td-inner">合计</td>
										</div>
										
										
									</div>

									<div class="order-main">
										<div class="order-list">
											
											
											<div class="order-status5">
												<div class="order-title">
													
												</div>
												
												<div class="order-content">
													<div class="order-left">
														<ul class="item-list"  v-for="(order,index) in orderData">
															<li class="td td-id">
																<div class="dd-num ss">{{order.orid}}</div>
															</li>
															<li class="td td-item">
																<div class="item-pic">
																	<a href="#" class="J_MakePoint">
																		<img :src="baseUrl+'/goods/getgoods?gid='+ order.goods.gid" class="itempic J_ItemImg">
																	</a>
																</div>
																<div class="item-info">
																	<div class="item-basic-info">
																		<a href="#">
																			<p>{{order.goods.gname}}</p>
																			<p class="info-little">描述：{{order.goods.gdesc}}</p>
																				<br/>
																		</a>
																	</div>
																</div>
															</li>
															<li class="td td-price">
																<div class="item-price">
																	￥{{order.goods.gprice}}.00
																</div>
															</li>
															<li class="td td-number">
																<div class="item-number">
																	<span>×</span>{{order.qty}}
																</div>
															</li>
															<li class="td td-operation">
																<div class="item-operation">
																	{{order.ostate}}
																</div>
															</li>
															<li class="td td-operation">
																<div class="item-operation s12" >
																	<a @click="del(order.oid,index,order.qty,order.aid)">删除订单</a>
																</div>
															</li>
														</ul>

													</div>
													<div class="order-right" v-show="orderData.length!=0">
														<li class="td td-amount">
															<div class="item-amount" style="margin-left:150px;width:100px;">
																合计：￥ {{getTotalPrice()}} 
															</div>
														</li>
														<div class="move-right">
															<li class="td td-status">
																
															</li>
															<li class="td td-change">
																
															</li>
														</div>
													</div>
												</div>
												<!--分页工具条-->
												<div id="row">
													<div class="col-sm-4">
														<div class="pageInfo">
															共{{pager.recordCount}}条数据{{pager.pageNum}}/{{pager.pageCount}}页
														</div>
													</div>
													<nav class="col-sm-8">
														<nav id="pageNav">
															<ul class="pagination pagination-sm pull-right">
																<li><a href="javascript:;" id="firstPage" @click="query(1)" v-show="pager.pageNum!=1">首页</a></li>
																<li><a href="javascript:;" id="prevPage" @click="query(pager.pageNum-1)" v-show="pager.pageNum!=1">上一页</a></li>
																<li :class="{active:pager.pageNum==i}" v-for="i in pageBtns"> <a href="javascript:;" @click="query(i)">{{i}}</a></li>
																<li><a href="javascript:;" id="nextPage" @click="query(pager.pageNum+1)" v-show="pager.pageNum!=pager.pageCount">下一页</a></li>
																<li><a href="javascript:;" id="lastPage" @click="query(pager.pageCount)" v-show="pager.pageNum!=pager.pageCount">末页</a></li>
															</ul>
														</nav>
													</nav>	
												</div>	
											</div>
										</div>
									</div>
								</div>
								<!-- 待付款订单 -->
								<div class="am-tab-panel am-fade" id="tab2">
									<div class="order-top">
										<div class="th th-id">
											<td class="td-inner">订单编号</td>
										</div>
										<div class="th th-item">
											<td class="td-inner">商品</td>
										</div>
										<div class="th th-price">
											<td class="td-inner">单价</td>
										</div>
										<div class="th th-number">
											<td class="td-inner">数量</td>
										</div>
										<div class="th th-operation">
											<td class="td-inner">商品操作</td>
										</div>
										<div class="th th-amount">
											<td class="td-inner">合计</td>
										</div>
										<div class="th th-status">
											<td class="td-inner">交易状态</td>
										</div>
										<div class="th th-change">
											<td class="td-inner">交易操作</td>
										</div>
									</div>

									<div class="order-main">
										<div class="order-list">
											<div class="order-status1">
												<div class="order-title">
													
												</div>
												<div class="order-content">
													<div class="order-left">
														<ul class="item-list"  v-for="(order,index) in orderData1">
															<li class="td td-id">
																<div class="dd-num ss">{{order.orid}}</div>
															</li>
															<li class="td td-item">
																<div class="item-pic">
																	<a href="#" class="J_MakePoint">
																		<img :src="baseUrl+'/goods/getgoods?gid='+ order.goods.gid" class="itempic J_ItemImg">
																	</a>
																</div>
																<div class="item-info">
																	<div class="item-basic-info">
																		<a href="#">
																			<p>{{order.goods.gname}}</p>
																			<p class="info-little">描述：{{order.goods.gdesc}}</p>
																				<br/>
																		</a>
																	</div>
																</div>
															</li>
															<li class="td td-price">
																<div class="item-price">
																	￥{{order.goods.gprice}}.00
																</div>
															</li>
															<li class="td td-number">
																<div class="item-number">
																	<span>×</span>{{order.qty}}
																</div>
															</li>
															<li class="td td-operation">
																<div class="item-operation">

																</div>
															</li>
															<li class="td td-amount">
																<div class="item-amount s21">
																	金额：￥   {{order.goods.gprice*order.qty}}.00
																	
																</div>
															</li>
															<li class="td td-status">
																<div class="item-status s22">
																	
																	<p >等待买家付款</p>
																	<a @click="quxiao(order.oid,index,order.qty,order.aid)">取消订单</a>

																</div>
															</li>
															<li class="td td-change">
																<a href="javascript:;" @click="pay(order.orid)">
																<div class="am-btn am-btn-danger anniu s23">
																	付款</div></a>
															</li>
															<hr>
														</ul>

													</div>
													
												</div>
											</div>
										</div>

									</div>
								</div>
								<!-- 待发货订单 -->
								<div class="am-tab-panel am-fade" id="tab3" >
									<div class="order-top">
										<div class="th th-id">
											<td class="td-inner">订单编号</td>
										</div>
										<div class="th th-item">
											<td class="td-inner">商品</td>
										</div>
										<div class="th th-price">
											<td class="td-inner">单价</td>
										</div>
										<div class="th th-number">
											<td class="td-inner">数量</td>
										</div>
										<div class="th th-operation">
											<td class="td-inner">商品操作</td>
										</div>
										<div class="th th-status">
											<td class="td-inner">交易状态</td>
										</div>
										<div class="th th-amount">
											<td class="td-inner">合计</td>
										</div>
										<div class="th th-change">
											<td class="td-inner">交易操作</td>
										</div>
									</div>

									<div class="order-main">
										<div class="order-list">
											<div class="order-status2">
												<div class="order-title">
													
												</div>
												<div class="order-content" >
													<div class="order-left" >
														<ul class="item-list" v-for="(order ,index) in orderData2">
															<li class="td td-id">
																<div class="dd-num ss">{{order.orid}}</div>
															</li>
															<li class="td td-item">
																<div class="item-pic">
																	<a href="#" class="J_MakePoint">
																		<img :src="baseUrl+'/goods/getgoods?gid='+ order.goods.gid" class="itempic J_ItemImg">
																	</a>
																</div>
																<div class="item-info">
																	<div class="item-basic-info">
																		<a href="#">
																			<p>{{order.goods.gname}}</p>
																			<p class="info-little">描述：{{order.goods.gdesc}}</p>
																				<br/>
																		</a>
																	</div>
																</div>
															</li>
															<li class="td td-price">
																<div class="item-price">
																	￥{{order.goods.gprice}}.00
																</div>
															</li>
															<li class="td td-number">
																<div class="item-number">
																	<span>×</span>{{order.qty}}
																</div>
															</li>
															<li class="td td-operation">
																<div class="item-operation">
																	<a href="javascript:;" @click="torefund(order.orid)">退款</a>
																</div>
															</li>
															<li class="td td-status">
																<div class="item-status" style="margin-top:20px;">
																	<p class="">买家已付款</p>
																	<a href="javascript:;" class="or" @click="orderinfo(order.orid,order.ostate)">订单详情</a>	
																</div>
															</li>
														</ul>

														
													</div>
													<div class="order-right r" v-show="orderData2.length!=0">
														<li class="td td-amount r1" style="width:100px;margin-left:20px;">
															<div class="item-amount">
																总计：￥{{getTotalPrice2()+10}}
																<p>含运费：<span>10.00</span></p>
															</div>
														</li>
														
														<li class="td td-change ">
															<div class="am-btn am-btn-danger anniu">
																提醒发货</div>
														</li>
														
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- 待收货订单 -->
								<div class="am-tab-panel am-fade" id="tab4">
									<div class="order-top">
										<div class="th th-id">
											<td class="td-inner">订单编号</td>
										</div>
										<div class="th th-item">
											<td class="td-inner">商品</td>
										</div>
										<div class="th th-price">
											<td class="td-inner">单价</td>
										</div>
										<div class="th th-number">
											<td class="td-inner">数量</td>
										</div>
										<div class="th th-operation">
											<td class="td-inner">商品操作</td>
										</div>
										<div class="th th-amount">
											<td class="td-inner">合计</td>
										</div>
										<div class="th th-status">
											<td class="td-inner">交易状态</td>
										</div>
										<div class="th th-change">
											<td class="td-inner">交易操作</td>
										</div>
									</div>

									<div class="order-main">
										<div class="order-list">
											<div class="order-status3">
												<div class="order-title">
													
												</div>
												<div class="order-content">
													<div class="order-left">
														<ul class="item-list" v-for="(order,index) in orderData3">
															<li class="td td-id">
																<div class="dd-num ss">{{order.orid}}</div>
															</li>
															<li class="td td-item">
																<div class="item-pic">
																	<a href="#" class="J_MakePoint">
																		<img :src="baseUrl+'/goods/getgoods?gid='+ order.goods.gid"  class="itempic J_ItemImg">
																	</a>
																</div>
																<div class="item-info">
																	<div class="item-basic-info">
																		<a href="#">
																			<p>{{order.goods.gname}}</p>
																			<p class="info-little">描述：{{order.goods.gdesc}}</p>
																				<br/>
																		</a>
																	</div>
																</div>
															</li>
															<li class="td td-price">
																<div class="item-price">
																	￥{{order.goods.gprice}}.00
																</div>
															</li>
															<li class="td td-number">
																<div class="item-number">
																	<span>×</span>{{order.qty}}
																</div>
															</li>
															<li class="td td-operation">
																<div class="item-operation">
																	<a href="javascript:;" @click="torefund(order.orid)">退款/退货</a>
																</div>
															</li>
															<li class="td td-amount">
																<div class="item-amount s21">
																	金额：￥  {{order.goods.gprice*order.qty}}
																	
																</div>
															</li>
															<li class="td td-status">
																<div class="item-status s32" style="margin-top:10px; width:80px">
																	<p>卖家已发货</p>
																	<a href="javascript:;" @click="orderinfo(order.orid,order.ostate)" >订单详情</a><br>
																	
																	
																</div>
															</li>
															<li class="td td-change">
																<a href="javascript:;" @click="ok(order.orid,index)">
																<div class="am-btn am-btn-danger anniu s23">
																	确认收货</div></a>
															</li>
														</ul>

														

													</div>
													<div class="order-right">
														
														
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!-- 已完成订单 -->
								<div class="am-tab-panel am-fade" id="tab5">
									<div class="order-top">
										<div class="th th-id">
											<td class="td-inner">订单编号</td>
										</div>
										<div class="th th-item">
											<td class="td-inner">商品</td>
										</div>
										<div class="th th-price">
											<td class="td-inner">单价</td>
										</div>
										<div class="th th-number">
											<td class="td-inner">数量</td>
										</div>
										<div class="th th-operation">
											<td class="td-inner">商品操作</td>
										</div>
										<div class="th th-amount">
											<td class="td-inner">合计</td>
										</div>
										<div class="th th-status">
											<td class="td-inner">交易状态</td>
										</div>
										<div class="th th-change">
											<td class="td-inner">交易操作</td>
										</div>
									</div>

									<div class="order-main">
										<div class="order-list">
											<!--不同状态的订单	-->
										<div class="order-status4">
												<div class="order-title">
													

												</div>
												<div class="order-content">
													<div class="order-left">
														<ul class="item-list" v-for="(order,index) in orderData4">
															<li class="td td-id">
																<div class="dd-num ss">{{order.orid}}</div>
															</li>
															<li class="td td-item">
																<div class="item-pic">
																	<a href="#" class="J_MakePoint">
																		<img :src="baseUrl+'/goods/getgoods?gid='+ order.goods.gid"  class="itempic J_ItemImg">
																	</a>
																</div>
																<div class="item-info">
																	<div class="item-basic-info">
																		<a href="#">
																			<p>{{order.goods.gname}}</p>
																			<p class="info-little">描述：{{order.goods.gdesc}}</p>
																				<br/>
																		</a>
																	</div>
																</div>
															</li>
															<li class="td td-price">
																<div class="item-price">
																	￥{{order.goods.gprice}}.00
																</div>
															</li>
															<li class="td td-number">
																<div class="item-number">
																	<span>×</span>{{order.qty}}
																</div>
															</li>
															<li class="td td-operation">
																<div class="item-operation">
																	<a href="javascript:;" @click="torefund(order.orid)">退款/退货</a>
																</div>
															</li>
															<li class="td td-amount">
																<div class="item-amount s21">
																	总计：￥  {{order.goods.gprice*order.qty}}
																	
																</div>
															</li>
															<li class="td td-status">
																<div class="item-status s32" style="margin-top:10px; width:80px">
																	<p>已完成订单</p>
																	<a href="javascript:;" @click="orderinfo(order.orid,order.ostate)" >订单详情</a><br>
																	
																	
																</div>
															</li>
															<li class="td td-change">
																<a href="javascript:;" >
																<div class="am-btn am-btn-danger anniu s23" @click="topinglun(order.orid)">
																	评价商品</div></a>
															</li>
														</ul>

													</div>
												
												</div>
											</div>
										</div>

									</div>

								</div>
							</div>

						</div>
					</div>
				</div>
				<!--底部-->
				<div class="footer">
					<div class="footer-hd">
						<p>
							
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">物流</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
							<em>© 2015-2025  <a href="http://www.cssmoban.com/" target="_blank" title=""></a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网页模板</a></em>
						</p>
					</div>

				</div>
			</div>
			<aside class="menu">
				<ul>
					<li class="person active">
						<a href="person/index.html"><i class="am-icon-user"></i>个人中心</a>
					</li>
					<!--管理员界面-->
					<li class="person">
						<p><i class="am-icon-qq"></i>管理系统</p>
						<ul>
							<li> <a href="querygoods.html">商品管理</a></li>
							<li> <a href="queryorder.html">订单管理</a></li>		
							
						</ul>
					</li>
					<!--普通界面-->
					<li class="person">
						<p><i class="am-icon-newspaper-o"></i>个人资料</p>
						<ul>
							<li> <a href="information.html">个人信息</a></li>
							<li> <a href="safety.html">安全设置</a></li>
							<li> <a href="address.html">地址管理</a></li>
							
						</ul>
					</li>
					<li class="person">
						<p><i class="am-icon-balance-scale"></i>我的交易</p>
						<ul>
							<li><a href="order.html">订单管理</a></li>
							<li> <a href="change.html">退款售后</a></li>
							<li> <a href="comment.html">评价商品</a></li>
						</ul>
					</li>
					
					<li class="person">
						<p><i class="am-icon-tags"></i>我的收藏</p>
						<ul>
							<li> <a href="collection.html">收藏</a></li>
																		
						</ul>
					</li>
					<li class="person">
						<p><i class="am-icon-qrcode"></i>在线客服</p>
						<ul>
							<li> <a href="suggest.html">意见反馈</a></li>		
							<li> <a href="news.html">我的消息</a></li>
						</ul>
					</li>
					
				</ul>

			</aside>
		</div>
		<script>
		
		var uid = localStorage.getItem('id');
		var LoginName = localStorage.getItem('LoginName');
		var zhuangtai = $('.zhuangtai');
		var shopping = $('.shopping');
			var vue = new Vue({
				el:'.container',
				data:{
					goods:{},
					user:{},
					orderData:[],
					orderData1:[],
					orderData2:[],
					orderData3:[],
					orderData4:[],
					baseUrl:baseUrl,
					order:{},
					pager: {}, //分页数据
					pageBtns: []//分页按钮数组
				},
				methods:{
					
					query:function(pageNum){
						axios.get(baseUrl + '/order/query',{
							params:{
								uid:uid,
								pageNum: pageNum,
								pageSize: 4
							}
						})
							.then(function(response) {
								
								this.orderData = response.data.list;
								this.pager = response.data.pager;
								//生成分页页码按钮
								var start = this.pager.pageNum - 2;
								var end = this.pager.pageNum + 2;

								if (this.pager.pageNum <= 3) {
									start = 1;
									end = 5;
								}
								if (end > this.pager.pageCount)
									end = this.pager.pageCount;
								this.pageBtns = [];

								for (var i = start; i <= end; i++) {
									this.pageBtns.push(i);
								}
								
							}.bind(this))
							.catch(function(error) {
								layer.msg('请求失败');
							});
						 axios.get(baseUrl + '/order/query1',{
							params:{
								uid:uid
							}
						})
							.then(function(response) {
								
								this.orderData1 = response.data;
								
								
							}.bind(this))
							.catch(function(error) {
								layer.msg('请求失败');
							});
						axios.get(baseUrl + '/order/query2',{
							params:{
								uid:uid
							}
						})
							.then(function(response) {
								
								this.orderData2 = response.data;
								
								
							}.bind(this))
							.catch(function(error) {
								layer.msg('请求失败');
							});
						axios.get(baseUrl + '/order/query3',{
							params:{
								uid:uid
							}
						})
							.then(function(response) {
								
								this.orderData3 = response.data;
								
								
							}.bind(this))
							.catch(function(error) {
								layer.msg('请求失败');
							});
						axios.get(baseUrl + '/order/query4',{
							params:{
								uid:uid
							}
						})
							.then(function(response) {
								
								this.orderData4 = response.data;
								
								
							}.bind(this))
							.catch(function(error) {
								layer.msg('请求失败');
							}); 
					},//删除记录
					remove: function(orid,index) {
						if(!window.confirm('确定移除吗？'))
							return;
						axios.get(baseUrl + '/order/delete',{
							params:{
								orid:orid
							}
						})
							.then(function(response) {
								
								this.orderData.splice(index, 1);
								layer.msg('删除记录成功！');
							}.bind(this))
							.catch(function(error) {
								layer.msg('请求失败');
							});
					},
					//返回订单总金额
					getTotalPrice: function() {
						var totalPrice = 0;
						//遍历订单数组数据
						this.orderData.forEach(function(order) {

							totalPrice += parseInt(order.qty) * order.goods.gprice;

						});
						
						return totalPrice;
					},
					//返回订单总金额
					getTotalPrice1: function() {
						var totalPrice = 0;
						//遍历订单数组数据
						this.orderData1.forEach(function(order) {

							totalPrice += parseInt(order.qty) * order.goods.gprice;

						});
						
						return totalPrice;
					},
					//返回订单总金额
					getTotalPrice2: function() {
						var totalPrice = 0;
						//遍历订单数组数据
						this.orderData2.forEach(function(order) {

							totalPrice += parseInt(order.qty) * order.goods.gprice;

						});
						
						return totalPrice;
					},
					//返回订单总金额
					getTotalPrice3: function() {
						var totalPrice = 0;
						//遍历订单数组数据
						this.orderData3.forEach(function(order) {

							totalPrice += parseInt(order.qty) * order.goods.gprice;

						});
						
						return totalPrice;
					},
					//返回订单总金额
					getTotalPrice4: function() {
						var totalPrice = 0;
						//遍历订单数组数据
						this.orderData4.forEach(function(order) {

							totalPrice += parseInt(order.qty) * order.goods.gprice;

						});
						
						return totalPrice;
					},
					del:function(oid,index,qty,aid){
						
						axios.get(baseUrl + '/order/update',{
							params:{
								oid:oid,
								ostate:"已删除",
								qty:qty,
								aid:aid	
							}
							
						}).then(function(response) {
							
							this.orderData.splice(index, 1);
							layer.msg('删除成功');
							
						}.bind(this))
						.catch(function(error) {
							layer.msg('请求失败');
						});
					},
					pay:function(orid){
						location.href="../home/pay.html?orid="+orid;
					},
					orderinfo:function(orid,ostate){
						location.href="orderinfo.html?orid="+orid+"&ostate="+ostate;
					},
					quxiao:function(oid,index,qty,aid){
						
						axios.get(baseUrl + '/order/update',{
							params:{
								oid:oid,
								ostate:"交易失败",
								qty:qty,
								aid:aid
							}
							
						}).then(function(response) {
							
							this.orderData1.splice(index, 1);
							layer.msg('已取消订单');
							
						}.bind(this))
						.catch(function(error) {
							layer.msg('请求失败');
						});
					},
					ok:function(orid,index){
						
						axios.get(baseUrl + '/order/update2',{
							params:{
								orid:orid,
								ostate:"已完成"
							}
							
						}).then(function(response) {
							
							layer.msg('已确认');
							this.orderData3.splice(index, 1);
							this.query(1);
						}.bind(this))
						.catch(function(error) {
							layer.msg('请求失败');
						});
					},topinglun:function(orid){
						location.href="commentlist.html?orid="+orid;
					},torefund:function(orid){
						location.href="refund.html?orid="+orid;
					}
					
					
				},
				mounted:function(){
					
					this.query(1);
					
				}				
			});		
				$('.dd').on('mouseover','#shopping',function(){
				console.log($(this).parent('.pp').siblings('.zhuangtai').text());
					if($(this).parent('.pp').siblings('.zhuangtai').text()=='已完成!'||$(this).parent('.pp').siblings('.zhuangtai').text()=='已付款!'){
						$(this).prop('disabled',true);
					}
				});
			$(document).ready(function() {							
					
				
			})
		</script>
	</body>

</html>